home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Assassins - Ultimate CD Games Collection 1
/
Assassins - Ultimate CD Games Collection (1994)(Weird Science)(Track 1 of 2)[!][Amiga-CD32-CDTV][CDD5332].iso
/
arcade
/
arcadia
/
level-designer.amos
/
level-designer.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1989-11-07
|
4KB
|
105 lines
Set Rainbow 1,1,24,"","","" : Rainbow 1,1,1,1 : Dim N(208) : Show
Global N(),POSITION,KOLOUR,NUMOFHITS,LEVEL,X,Y
Fade 1 : Cls 0
Load Iff "arcadia.iff",0 : Cls 0,234,0 To 319,255 : Colour 14,$668
Fade 1 To 0 : LEVEL=1 : KOLOUR=6 : NUMOFHITS=1 : INIT : BLOCKIN
Do
C=Choice(1)
If C=1 Then SETCOLOUR
If C=2 Then SETNOH
If Key State(80) Then BLOCKIN
If Key State(81) Then BLOCKOUT
If Key State(83) Then SETLEVEL[-1]
If Key State(82) Then SETLEVEL[1]
If Key State(84) Then INIT
If Key State(85) Then DISKSAVE
If Key State(86) Then Run "ARCADIA.AMOS"
X=X Screen(X Mouse) : Y=Y Screen(Y Mouse) : X=X-17 : Y=Y-25 : X=X/16+1 : Y=Y/8 : If X>0 and X<14 and Y>-1 and Y<16 Then Pen 0 : Paper 14 : POSITION=X+Y*13 : Locate 17,25 : Print POSITION;" "
If Mouse Key=1 Then SETBRICK
Loop
Edit
Procedure INIT
Change Mouse 3
For Z=1 To 207 Step 13 : For ZZ=0 To 12
Ink 0 : POSITION=Z+ZZ : X=ZZ*16+16 : Y=((Z+12)/13*8)+16
Box X,Y To X+16,Y+8 : Ink 14 : Bar X+1,Y+1 To X+15,Y+7 : N(POSITION)=0
Next ZZ : Next Z
Paper 14 : Pen 0 : Locate 6,23 : Print "MUMBER OF HITS=";NUMOFHITS;" "
Locate 8,25 : Print "POSITION=";POSITION;" "
Locate 7,27 : Print "EDITING LEVEL";LEVEL;" "
Locate 6,21 : Print "COLOUR IN USE=" : Ink 0 : Box 161,166 To 181,176 : Ink KOLOUR : Paint 165,170,1
Pen 6 : Locate 3,29 : Print "RIGHT MOUSE KEY FOR MENU"
Paper 12 : Pen 0 : Menu$(1)=" COLOUR " : Menu$(2)=" NUMBER OF HITS"
Pen 0 : For Z=1 To 12 : Paper Z : Menu$(1,Z)="> " : Next
Pen 7 : Paper 0 : Menu$(2,1)="SOLID" : For Z=2 To 10 : Menu$(2,Z)=" "+Str$(Z-1)+" " : Next : Menu$(2,11)="CLEAR"
Locate 31,1 : Print "OPTIONS"
Locate 31,2 : Print "======="
Locate 34,4 : Print "F1" : Locate 34,8 : Print "F2" : Locate 34,12 : Print "F3" : Locate 34,16 : Print "F4" : Locate 34,20 : Print "F5" : Locate 34,24 : Print "F6" : Locate 34,28 : Print "F7"
Locate 33,5 : Print "SHOW"
Locate 32,9 : Print "STORE"
Locate 31,13 : Print "LEVEL UP"
Locate 30,17 : Print "LEVEL DOWN"
Locate 30,21 : Print "CLEAR PAGE"
Locate 30,25 : Print "DISK SAVE"
Locate 30,26 : Print "ALL LEVELS"
Locate 33,29 : Print "QUIT"
KOLOUR=7 : NUMOFHITS=1
Change Mouse 1
Menu On
End Proc
Procedure BLOCKOUT
Change Mouse 3
D=Start(9) : E=LEVEL-1 : E=E*416 : Add D,E
For Z=1 To 208 Step 13 : For ZZ=0 To 12
A=Z+ZZ : X=ZZ*16+18 : Y=((Z+12)/13*8)+18
B=Point(X,Y) : C=N(A) :
Poke D,B : Poke D+1,C : Add D,2
Next ZZ : Next Z
Change Mouse 1 : KOLOUR=7 : NUMOFHITS=1
End Proc
Procedure BLOCKIN
Change Mouse 3
D=Start(9) : E=LEVEL-1 : E=E*416 : Add D,E
For Z=1 To 208 : POSITION=Z : KOLOUR=Peek(D) : NUMOFHITS=Peek(D+1) : N(Z)=NUMOFHITS
If N(Z)>20 Then N(Z)=-1 : NUMOFHITS=-1
X=POSITION mod 12 : X=X*16+18 : Y=((POSITION+12)/13*8)+18
If KOLOUR<>14 Then SETBRICK
Add D,2 : Next Z
Change Mouse 1 : KOLOUR=7 : NUMOFHITS=1
End Proc
Procedure SETCOLOUR
If NUMOFHITS<>0 Then KOLOUR=Choice(2)
Ink KOLOUR : Paint 165,170,1
End Proc
Procedure SETNOH
NUMOFHITS=Choice(2)-1
Paper 14 : Pen O
If NUMOFHITS>0 and NUMOFHITS<10 Then Locate 21,23 : Print NUMOFHITS;" "
If NUMOFHITS=0 Then NUMOFHITS=-1 : Locate 21,23 : Print "SOLID"
If NUMOFHITS=10 Then Ink 14 : KOLOUR=14 : Paint 165,170,1 : Locate 21,23 : Print "CLEAR" : NUMOFHITS=0
End Proc
Procedure SETBRICK
Ink KOLOUR : X=POSITION mod 13 : Y=POSITION/13
If X=0 Then Add X,13 : Add Y,-1
X=X*16 : Y=Y*8+25
Bar X+1,Y To X+15,Y+6
If KOLOUR<13 and NUMOFHITS>0 Then Gr Writing 0 : Q=KOLOUR : Add Q,11,0 To 15 : Ink Q,KOLOUR : Text X-3,Y+6,Str$(NUMOFHITS) : Gr Writing 1
N(POSITION)=NUMOFHITS
End Proc
Procedure SETLEVEL[D]
While Key State(82) or Key State(83)
If Key State(82) Then D=1
If Key State(83) Then D=-1
Add LEVEL,D,1 To 50
Ink 0 : Paper 14 : Locate 20,27 : Print LEVEL;" " : Wait 15
Wend
INIT
BLOCKIN
End Proc
Procedure DISKSAVE
Change Mouse 3
Doke Start(9)+20900,100
Poke Start(9)+20908,1
Save "BRICKS2.ABK",9
Change Mouse 1
End Proc